<template>
  <div class="search">
    <router-link to="/search"
      ><input type="text" placeholder="网易云课堂" v-model="input" @keydown.enter="search"
    /></router-link>
  </div>
</template>

<script>
export default {
  data(){
    return{
      input:''
    }
  },
  methods:{
    search(){
      this.$emit('search',this.input)
    }
  }
};
</script>

<style scoped>
.search {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  padding-top: 0.1rem;
  padding-bottom: 0.2rem;
}
input {
  width: 6.92rem;
  height: 0.66rem;
  border-radius: 0.34rem;
  text-indent: 0.74rem;
  background: url("../assets/img/搜索.png") no-repeat 0.14rem center;
  background-color: #f2f4f8;
}
</style>
